package com.lyl.syt.constant.wx;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class WxConstant implements InitializingBean {

    @Value("${wx.open.app_id}")
    private String appId;
    @Value("${wx.open.app_secret}")
    private String appSecret;
    @Value("${wx.open.redirect_uri}")
    private String redirectUri;
    @Value("${yygh.baseUrl}")
    private String yyghBaseUrl;

    public static String APP_ID;
    public static String APP_SECRET;
    public static String REDIRECT_URI;
    public static String YYGH_BASE_URL;

    @Override
    public void afterPropertiesSet() throws Exception {
        APP_ID = appId;
        APP_SECRET = appSecret;
        REDIRECT_URI = redirectUri;
        YYGH_BASE_URL = yyghBaseUrl;
    }
}
